package com.zt.controller;

import com.zt.service.TransferService;
import com.zt.utils.Result;
import com.zt.vo.CardBindingVo;
import com.zt.vo.TransactionRecordVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("transfer")
public class TransferController {

    @Resource
    private TransferService transferService;


    //转账功能
    @GetMapping("TransferAccounts")
    public Result TransferAccounts(CardBindingVo cardBindingVo){
        return transferService.TransferAccounts(cardBindingVo);
    }

    //查询转账记录
    @GetMapping("list")
    public Result list(TransactionRecordVo transactionRecordVo){
        return transferService.PageTransfer(transactionRecordVo);
    }
}
